Namespace Producto
Public Class Producto
	Inherits Auditoria.Transaccion

	Private vProductoId As Integer = -1
	Private vCatalogado As Integer = -1
	Private vCatalogoId As Integer = -1
	Private vCatalogoNombre As string =""
	Private vTipoId As Integer = -1
	Private vTipoNombre As string =""
	Private vMarcaId As Integer = -1
	Private vMarcaNombre As string =""
	Private vNombre As String = ""
	Private vCodigo As String = ""
	Private vFormaSimpleId As Integer = -1
	Private vFormaSimpleNombre As string =""
	Private vFormaCompuestaId As Integer = -1
	Private vFormaCompuestaNombre As string =""
	Private vConcentracion As String = ""
	Private vPresentacion As String = ""
	Private vFracciones As Integer = -1
        Private vProductoStock As Integer = -1
	Private vProductoPrecioUnitario As Double = 0.0
	Private vProductoPrecioPromedio As Double = 0.0
	Private vProductoGenerico As Integer = -1
	Private vProductoDescripcion As String = ""
	Private vProductoObservacion As String = ""

	Public Property ProductoId() As Integer
		Get
			Return vProductoId
		End Get
		Set(ByVal Value As Integer)
			vProductoId = Value
		End Set
	End Property

	Public Property Catalogado() As Integer
		Get
			Return vCatalogado
		End Get
		Set(ByVal Value As Integer)
			vCatalogado = Value
		End Set
	End Property

	Public Property CatalogoId() As Integer
		Get
			Return vCatalogoId
		End Get
		Set(ByVal Value As Integer)
			vCatalogoId = Value
		End Set
	End Property

	Public Property CatalogoNombre() as string
		Get
			Return vCatalogoNombre
		End Get
		Set(ByVal Value As string)
			vCatalogoNombre = Value
		End Set
	End Property

	Public Property TipoId() As Integer
		Get
			Return vTipoId
		End Get
		Set(ByVal Value As Integer)
			vTipoId = Value
		End Set
	End Property

	Public Property TipoNombre() as string
		Get
			Return vTipoNombre
		End Get
		Set(ByVal Value As string)
			vTipoNombre = Value
		End Set
	End Property

	Public Property MarcaId() As Integer
		Get
			Return vMarcaId
		End Get
		Set(ByVal Value As Integer)
			vMarcaId = Value
		End Set
	End Property

	Public Property MarcaNombre() as string
		Get
			Return vMarcaNombre
		End Get
		Set(ByVal Value As string)
			vMarcaNombre = Value
		End Set
	End Property

	Public Property Nombre() As String
		Get
			Return vNombre
		End Get
		Set(ByVal Value As String)
			vNombre = Value
		End Set
	End Property

	Public Property Codigo() As String
		Get
			Return vCodigo
		End Get
		Set(ByVal Value As String)
			vCodigo = Value
		End Set
	End Property

	Public Property FormaSimpleId() As Integer
		Get
			Return vFormaSimpleId
		End Get
		Set(ByVal Value As Integer)
			vFormaSimpleId = Value
		End Set
	End Property

	Public Property FormaSimpleNombre() as string
		Get
			Return vFormaSimpleNombre
		End Get
		Set(ByVal Value As string)
			vFormaSimpleNombre = Value
		End Set
	End Property

	Public Property FormaCompuestaId() As Integer
		Get
			Return vFormaCompuestaId
		End Get
		Set(ByVal Value As Integer)
			vFormaCompuestaId = Value
		End Set
	End Property

	Public Property FormaCompuestaNombre() as string
		Get
			Return vFormaCompuestaNombre
		End Get
		Set(ByVal Value As string)
			vFormaCompuestaNombre = Value
		End Set
	End Property

	Public Property Concentracion() As String
		Get
			Return vConcentracion
		End Get
		Set(ByVal Value As String)
			vConcentracion = Value
		End Set
	End Property

	Public Property Presentacion() As String
		Get
			Return vPresentacion
		End Get
		Set(ByVal Value As String)
			vPresentacion = Value
		End Set
	End Property

	Public Property Fracciones() As Integer
		Get
			Return vFracciones
		End Get
		Set(ByVal Value As Integer)
			vFracciones = Value
		End Set
	End Property

        Public Property ProductoStock() As Integer
            Get
                Return vProductoStock
            End Get
            Set(ByVal Value As Integer)
                vProductoStock = Value
            End Set
        End Property

	Public Property ProductoPrecioUnitario() As Double
		Get
			Return vProductoPrecioUnitario
		End Get
		Set(ByVal Value As Double)
			vProductoPrecioUnitario = Value
		End Set
	End Property

	Public Property ProductoPrecioPromedio() As Double
		Get
			Return vProductoPrecioPromedio
		End Get
		Set(ByVal Value As Double)
			vProductoPrecioPromedio = Value
		End Set
	End Property

	Public Property ProductoGenerico() As Integer
		Get
			Return vProductoGenerico
		End Get
		Set(ByVal Value As Integer)
			vProductoGenerico = Value
		End Set
	End Property

	Public Property ProductoDescripcion() As String
		Get
			Return vProductoDescripcion
		End Get
		Set(ByVal Value As String)
			vProductoDescripcion = Value
		End Set
	End Property

	Public Property ProductoObservacion() As String
		Get
			Return vProductoObservacion
		End Get
		Set(ByVal Value As String)
			vProductoObservacion = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef ProductoId As Integer, ByVal Catalogado As Integer, ByVal CatalogoId As Integer, ByVal TipoId As Integer, ByVal MarcaId As Integer, ByVal Nombre As String, ByVal Codigo As String, ByVal FormaSimpleId As Integer, ByVal FormaCompuestaId As Integer, ByVal Concentracion As String, ByVal Presentacion As String, ByVal Fracciones As Integer, ByVal ProductoStock As String, ByVal ProductoPrecioUnitario As Double, ByVal ProductoPrecioPromedio As Double, ByVal ProductoGenerico As Integer, ByVal ProductoDescripcion As String, ByVal ProductoObservacion As String)
		vProductoId = ProductoId
		vCatalogado = Catalogado
		vCatalogoId = CatalogoId
		vTipoId = TipoId
		vMarcaId = MarcaId
		vNombre = Nombre
		vCodigo = Codigo
		vFormaSimpleId = FormaSimpleId
		vFormaCompuestaId = FormaCompuestaId
		vConcentracion = Concentracion
		vPresentacion = Presentacion
		vFracciones = Fracciones
		vProductoStock = ProductoStock
		vProductoPrecioUnitario = ProductoPrecioUnitario
		vProductoPrecioPromedio = ProductoPrecioPromedio
		vProductoGenerico = ProductoGenerico
		vProductoDescripcion = ProductoDescripcion
		vProductoObservacion = ProductoObservacion
	End Sub

End Class



 Public Class ProductoCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As Producto) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As Producto)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property Producto(ByVal Index As Integer) As Producto
Get
Return CType(MyBase.List(Index), Producto)
End Get
End Property
End Class
end namespace

